/* Copyright 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * This is the stylesheet used by the Out of the box experience (OOBE) flow,
 * sign in and lock screens.
 */

:root {
  --google-grey-700: rgb(95, 99, 104);
  --shelf-area-height-base: 57px;
  --oobe-oobe-dialog-height-base: 504px;
  --oobe-oobe-dialog-width-base: 461px;
}

html,
body {
  height: 100%;
  width: 100%;
}

html {
  --shelf-area-height: var(--shelf-area-height-base);
}

html[virtual-keyboard=true],
html[screen=gaia-signin] {
  /* has to be with px suffix to be used in calc */
  --shelf-area-height: 0px;
}

body {
  background-color: transparent;
  cursor: default;
  font-size: 14px;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: fixed;
  top: 0;
}

/* Keep full-screen white background even when user signs into session after
 * oobe */
html[screen=oobe] body {
  background-color: white;
}

/* New dialog size */
html {
  --oobe-adaptive-dialog-width: var(--oobe-oobe-dialog-width-base);
  --oobe-adaptive-dialog-height: var(--oobe-oobe-dialog-height-base);
}

/* Padding defaults */
html {
  --oobe-dialog-footer-height: 96px;
  --oobe-dialog-footer-padding: 32px;
  --oobe-dialog-content-padding: 64px;
  --oobe-dialog-content-padding-top: 20px;
  --oobe-dialog-header-padding-top: 64px;

  /* This size fits 675px screen with docked magnifier and shelf. Basically this
   * is calc(675px * (1 - 1 / 3) - 10px - var(--shelf-area-height-base)) where
   * 3 is DockedMagnifierController::kDefaultScreenHeightDivisor
   * 10 is DockedMagnifierController::kSeparatorHeight */
  --oobe-dialog-min-height: 384px;

  --oobe-dialog-side-margin: 48px;

  --oobe-dialog-adaptable-flex-direction: column;

  --oobe-forward-slide-animation: translateX(+100%);
  --oobe-backward-slide-animation: translateX(-100%);
}

html[dir=rtl] {
  --oobe-forward-slide-animation: translateX(-100%);
  --oobe-backward-slide-animation: translateX(+100%);
}

html[screen=gaia-signin] {
  /* has to be with px suffix to be used in calc */
  --oobe-dialog-side-margin: 0px;
}


@media screen and (max-width: 864px), (max-height: 736px) {
  html[screen=oobe] {
    --oobe-dialog-footer-height: 80px;
    --oobe-dialog-footer-padding: 24px;
    --oobe-dialog-content-padding: 32px;
    --oobe-dialog-header-padding-top: 32px;
  }
}

/* Adapt for horizontal screen */
@media screen and (min-width: 768px) and (max-height: 768px) {
  html[screen=oobe] {
    --oobe-dialog-adaptable-flex-direction: row;
  }
}

/* Adapt for horizontal screen. 616px - corresponding height of the OOBE dialog
 * for gaia-signin flow when screen height is 768px */
@media screen and (min-width: 616px) and (max-height: 616px) {
  html[screen=gaia-signin] {
    --oobe-dialog-adaptable-flex-direction: row;
  }
}

html[screen=gaia-signin][dialog-padding=narrow] {
  --oobe-dialog-footer-height: 80px;
  --oobe-dialog-footer-padding: 24px;
  --oobe-dialog-content-padding: 32px;
  --oobe-dialog-header-padding-top: 32px;
}

body.solid {
  background-color: white;
}

button {
  font-family: inherit;
  outline: none;
}

.label,
.flexible-label {
  display: block;
  margin: 5px 5px 5px 0;
  padding: 5px 5px 5px 0;
}

.label {
  width: 170px;
}

.flexible-label {
  max-width: 250px;
}

[hidden] {
  display: none !important;
}

span.bold {
  font-weight: bold;
}

#version-labels {
  color: var(--google-grey-700);
  font-size: 13px;
  margin: 10px;
  position: relative;
  text-align: end;
  transition: all 500ms linear;
  z-index: 1;
}

#bluetooth-name {
  background: rgba(255,255,255,.17);
  border-radius: 4px;
  display: inline-block;
  font-size: 12px;
  height: 28px;
  line-height: 28px;
  padding: 0 12px;
}

.throbber {
  margin-block-end: 0.5em;
  margin-top: 1px;
}

/*
Styles related to the `md-screen-container`
*/

#outer-container {
  height: 100%;
  z-index: 1;
}

.oobe-vertical-margin {
  align-self: stretch;
  flex: 0 1 auto; /* grow shrink basis */
  height: var(--oobe-dialog-side-margin);
  min-height: 0;
}

#scroll-container {
  bottom: var(--shelf-area-height);  /* Leave space for the shelf */
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: 0;
}

#scroll-container.disable-scroll {
  overflow-y: hidden;
}

#inner-container {
  border-radius: 2px;
  position: relative;
}

#inner-container {
  display: grid;
  place-items: center;
}

#inner-container.animation {
  overflow: hidden;
}

#inner-container.disabled {
  opacity: 0.4;
  pointer-events: none;
}

#inner-container.disable-scroll {
  left: 0;
  position: absolute;
}

/* Only play this animation when 'down' class is removed. */
.oobe-display #inner-container:not(.down) {
  transition: transform 200ms ease-in-out;
}

.oobe-display #inner-container.down {
  transform: translateY(50px) rotateX(-2.5deg);
}

#oobe {
  display: grid;
  flex: 1 0 auto; /* grow shrink basis */
  min-height: var(--oobe-dialog-min-height);
  place-items: center;
  width: 100%;
}

/* Styles related to the `top_header_bar` */

#top-header-bar {
  z-index: 1;
}

.top-header-bar-strip {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  width: 100%;
}

/* Styles related to the `api-keys-container` */

#api-keys-notice-container {
  display: flex;
  justify-content: center;
  min-height: 0;
  position: fixed;
  top: 10px;
  width: 100%;
}

#api-keys-notice {
  background-color: rgba(0, 0, 0, 0.75);
  border-radius: 4px;
  color: whitesmoke;
  font-size: 15px;
  padding: 20px;
  text-align: center;
  width: 722px; /* same as #signin-banner */
}
